<template>
  <div class="admin">
    <el-container>
      <el-header>
        <el-row>
          <el-col :span="4" class="logo">
            <img height="100" src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png">
          </el-col>
          <el-col :span="4" :offset="16">
            <div class="user-info">
              个人信息
            </div>
          </el-col>
        </el-row>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <router-link :to="{ name: 'admin-home' }">首页</router-link>
          <router-link :to="{ name: 'admin-news' }">新闻</router-link>
<!--          <router-link :to="{ name: 'admin-home' }" exact-active-class="active">首页</router-link>-->
<!--          <router-link :to="{ name: 'admin-news' }" exact-active-class="active">新闻</router-link>-->
<!--          router-link-exact-active router-link-active-->
<!--          router-link-exact-active active-->
<!--          <router-link>新闻</router-link>-->
        </el-aside>
        <el-main>
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style lang="less">
@header-height: 100px;
.logo {
  img {
    height: 100px;
  }
}

.el-header {
  background-color: #B3C0D1;
  color: #333;
  text-align: center;
  height: @header-height !important;

  .user-info {
    line-height: 100px;
  }
}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
  text-align: center;
  height: calc(100vh - @header-height);

  a {
    display: block;
    height: 50px;
    line-height: 50px;
    border: 1px solid #E9EEF3;
    color: #333;

    &.active {
      color: red;
      background: aqua;
    }
  }
}

.el-main {
  background-color: #E9EEF3;
  color: #333;
}
</style>
